<?php

namespace App\Http\Presenters;

use Laracasts\Presenter\Presenter;

class ClasePresenter extends Presenter
{

    public function isLimited($label = null)
    {
        switch ($this->is_limited) {
            case 1:
                $value = isset($label)?'限名额':'<i class="ace-icon fa fa-check green"></i>';
                break;
            case 0:
                $value = '';
                break;
            default:
                break;
        }
        return $value;
    }

    public function isExam($label = null)
    {
        switch ($this->is_exam) {
            case 1:
                $value = isset($label)?'入学考试':'<i class="ace-icon fa fa-check green"></i>';
                break;
            case 0:
                $value = '';
                break;
            default:
                break;
        }
        return $value;
    }

    public function isHandin($label = null)
    {
        switch ($this->is_handin) {
            case 1:
                $value = isset($label)?'上交作品/证书':'<i class="ace-icon fa fa-check green"></i>';
                break;
            case 0:
                $value = '';
                break;
            default:
                break;
        }
        return $value;

    }


}
